package com.vcourse.service.admin.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.vcourse.service.admin.entity.User;
import org.springframework.security.core.userdetails.UserDetails;

import java.util.List;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author testjava
 * @since 2020-01-12
 */
public interface UserService extends IService<User> {

    /**
     * 从数据库中取出用户信息
     */
    User selectByUsername(String username);

    /**
     * 登录
     */
    String login(String username, String password);

    /**
     * 获取指定用户的可访问菜单
     */
    List<String> getPermissionList(String userId, String username);

    /**
     * 根据用户名得到UserDetails
     */
    UserDetails loadUserByUsername(String username);
}
